package com.qixin.web.controller.TencentMap;


import com.qixin.web.bean.WeCollection;
import com.qixin.web.service.WeCollectionService;
import com.sun.org.apache.xpath.internal.operations.Mod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 * 微信 我的收藏 前端控制器
 * </p>
 *
 * @author 张子艺
 * @since 2018-10-31
 */
@Controller
@RequestMapping("/weCollection")
public class WeCollectionController {
    @Autowired
    WeCollectionService weCollectionService;
    /**
     * 跳转我的收藏
     */
    @RequestMapping("/main.html")
    public String main(Model model,HttpSession session){
        model.addAttribute("MyLike",weCollectionService.findMyLike(session));
        return "/Map/LikeCharge";
    }
	 /**
     *  新增我的收藏
     */
    @RequestMapping("/insertMyLike")
    @ResponseBody
    public String insertMyLike(HttpSession session,Long chargeId){

        return    weCollectionService.insertMyLike(session,chargeId);

    }



}
